package bis;

import java.io.Serializable;
import java.util.ArrayList;
import obj.CommonVar;

public class FLCustomer extends FLBase implements Serializable {

    String bm, mc, mm;

    public void setUpdate(FLCustomer aflc) {
        CommonVar.flcustomermgr.setUpdate(aflc);
    }

    public void setDelete(String bm) {
        CommonVar.flcustomermgr.flcdelete(bm);

    }

    @Override
    public int getMaxidbyid() {
        super.formname = "tblCustomer";
        return super.getMaxidbyid();
    }

    @Override
    public int getmaxidbybm() {
        super.formname = "tblCustomer";
        return super.getmaxidbybm();
    }

    public ArrayList getDate() {
        return CommonVar.flcustomermgr.GetAllDate();
    }

    public ArrayList getDatebyid() {
        return CommonVar.flcustomermgr.GetDateById(mc);
    }

    public boolean isInsert() {
        if (this.getDatebyid()==null){
            return CommonVar.flcustomermgr.isInsert(String.valueOf(this.getmaxidbybm()), mc, mm);
        } else {
            return false;
        }
    }

    public String getBm() {
        return bm;
    }

    public void setBm(String Bm) {
        this.bm = Bm;
    }

    public String getMc() {
        return mc;
    }

    public void setMc(String mc) {
        this.mc = mc;
    }

    public String getMm() {
        return mm;
    }

    public void setMm(String mm) {
        this.mm = mm;
    }

    public FLCustomer(String Bm, String mc, String mm) {
        this.bm = Bm;
        this.mc = mc;
        this.mm = mm;
    }

    public FLCustomer() {
    }

    public static void main(String[] args) {
        FLCustomer c = new FLCustomer("1000", "anmeng", "流氓");
        c.setDelete("1000");


    }
}
